import axiosIns from '@/utils/request';
const proxyStr = '/proxy_abhd';

export const fetchXfrw = {
  pageList: (data) => {
    const { pageIndex = 1, pageSize = 10 } = data;
    delete data.pageIndex;
    delete data.pageSize;
    return axiosIns.post(`${proxyStr}/abhd/xfrw/queryRwxfPageList`, data, {
      params: { pageIndex, pageSize }
    });
  },
  addItemList: (data) => {
    return axiosIns.post(`${proxyStr}/abhd/xfrw/addRwxfList`, data);
  },
  updateItem: (data) => {
    return axiosIns.put(`${proxyStr}/abhd/xfrw/updateRwxf`, data);
  },
  deleteItem: (id) => {
    return axiosIns.delete(`${proxyStr}/abhd/xfrw/deleteRwxf/${id}`);
  },
  getItemList: (id) => {
    return axiosIns.get(`${proxyStr}/abhd/xfrw/queryRwxfList/${id}`);
  },
}